package cn.neusoft.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 受不了原来的实体类了，服务之间通信太麻烦，所以搞了这个新实体类
 * 想杀了原来的自己
 * 痛苦
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Order1 implements Serializable {

    private String order_id;

    private Integer order_kind;

    private String order_customer_id;

    private String order_commodity_id;

    private String order_status;

    private String del_flag;

    private String create_by;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date create_time;

    private String original_id; // 原订单号，没有就是null

    private BigDecimal price; // 商品单价(原价*折扣)

    private Long amount;        // 商品数量、退/换货数量

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;  // 送达/退货/换货日期

    private String addr;    // 地址

    private String reason;  // 退/换货原因

    private String customer_name;

    private String commodity_name;

    private Long best_substation_id;    // 最佳分站id

    private String coordinate;  // 坐标(即经纬度)

}
